#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main() {
    int* arr = (int*)malloc(sizeof(int));
    int sz = 0;
    char a = 0;
    while ((a = getchar()) != '\n')
    {
        arr[sz] = a - 48;
        arr = realloc(arr, (++sz + 1) * sizeof(int));
    }

    long long x = 0;
    int n = 0;
    for (int i = 0; i < sz; i++)
    {
        x += arr[i] * pow(10, n++);
    }
    for (int i = sz - 2; i >= 0; i--)
    {
        x += arr[i] * pow(10, n++);
    }

    //printf("%d ",x);
    for (int i = 2; i <= sqrt(x); i++)
    {
        if (x % i == 0)
        {
            printf("noprime");
            return 0;
        }
    }
    printf("prime");

    free(arr);
    arr = NULL;

    return 0;
}